package com.zw.april14thh;

import com.zw.april14thh.utils.SaltUtils;
import org.apache.shiro.crypto.hash.Md5Hash;
import org.junit.Test;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

public class test {

    @Test
    public void name() throws NoSuchAlgorithmException {

//        String salt = SaltUtils.getSalt(8);
        String salt = "1DcEFrFa";
        String password= "123456";
        Md5Hash md5Hash = new Md5Hash(password, salt, 1024);
        System.out.println(salt);
        System.out.println(md5Hash.toHex());
    }
}
